package com.tzy.parser.core;

public class Constant {

    public static final String AND = "AND";

    public static final String NOT = "NOT";

    public static final String OR = "OR";

    public static final char ADD = '+';

    public static final char SUB = '-';

    public static final char MUL = '*';

    public static final char DIV = '/';


    public static final String SPACE = " ";


    public static final String GT="&gt";

    public static final String LT="&lt";

    public static final String GTE="&gte";

    public static final String LTE="&lte";

    public static final String EQ="&eq";

    public static boolean isLogicalOperations(String template) {

        return template.contains(SPACE + AND + SPACE) || template.contains(SPACE + OR + SPACE) || template.contains(NOT + SPACE);
    }


    public static boolean isComputationOperations(String template) {

        return template.contains(ADD + "") || template.contains(SUB + "") || template.contains(MUL + "") || template.contains(DIV + "");
    }

    public static boolean isCompareOperations(String template) {

        return template.contains(SPACE + GT + SPACE) || template.contains(SPACE + LT + SPACE)||
                template.contains(SPACE + GTE + SPACE)|| template.contains(SPACE + LTE + SPACE)||
                template.contains(SPACE + EQ + SPACE);
    }
}
